package br.com.spring.mvc.entity.infra;

public class Message {

	private TypeMessage type;
	private String message;	
	
	public Message(TypeMessage type, String message) {
		super();
		this.type = type;
		this.message = message;
	}
	
	public TypeMessage getType() {
		return type;
	}
	public void setType(TypeMessage type) {
		this.type = type;
	}
	public String getMessage() {
		return message;
	}
	public void setMessage(String message) {
		this.message = message;
	}
	
	public static Message getSuccesMessage(String message){
		return new Message(TypeMessage.SUCCES, message);		
	}
	
	public static Message getInformationMessage(String message){
		return new Message(TypeMessage.INFORMATION, message);		
	}
	
	public static Message getWarningMessage(String message){
		return new Message(TypeMessage.WARNING, message);		
	}
	
	public static Message getErrorMessage(String message){
		return new Message(TypeMessage.ERROR, message);		
	}
	
	
}
